﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using TrainingManagement.web.Models.ViewModels;

namespace TrainingManagement.web.Controllers
{
    public class SkillController : Controller
    {
        //
        // GET: /Skill/

        public ActionResult Index()
        {
            return null;
        }

        [HttpGet]
        public ActionResult CreateSkill()
        {
            return View(new SkillCreateViewModel());
        }

        [HttpPost]
        public ActionResult CreateSkill(SkillCreateViewModel model)
        {
            if (!string.IsNullOrEmpty(model.Title))
            {
                model.Save();
            }
            return View("CreateSkill");
        }

    }
}
